#include <bits/stdc++.h>
using namespace std;
#define int long long
int n,m,ans;
int a[200006],cnt[200006];
signed main(){
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    scanf("%lld",&n);
    for(int i=1;i<=n;i++){
        cin>>a[i];
        cnt[a[i]]++;
    }
    sort(a+1,a+n+1);
    for(int i=1;i<=n;i++){
      if(a[i]!=a[i-1]){
         ans=ans-cnt[a[i]]<0?0:ans-cnt[a[i]];
         ans+=cnt[a[i]];
      }
    }
    cout<<ans;
    return 0;
}
